const {
  aceVimMap,
  mapkey,
  imap,
  imapkey,
  getClickableElements,
  vmapkey,
  map,
  unmap,
  unmapAllExcept,
  vunmap,
  cmap,
  addSearchAlias,
  removeSearchAlias,
  tabOpenLink,
  readText,
  Clipboard,
  Front,
  Hints,
  Visual,
  RUNTIME
} = api;

//------------------------------Key Mappings Bigin------------------------------//

// 解绑默认的 ob 命令，并将 ow：打开bing搜索栏 绑定到 ob
unmap('ob');
map('ob', 'ow');



//------------------------------Key Mappings End--------------------------------//




//------------------------------Custom Keys Bigin-------------------------------//
mapkey(';fc', '#1Mouse right click on elements.', function() {
    Hints.create("", Hints.dispatchMouseClick, {mouseEvents: ["contextmenu"]});
});

mapkey(';fn', '#1Double click on streams node to edit.', function() {
    Hints.create(".stream-row", function(element) {
        var evt = document.createEvent("MouseEvents");
        evt.initMouseEvent("dblclick", true, true);
        element.dispatchEvent(evt);
    });
});

//------------------------------Custom Keys End---------------------------------//




//------------------------------Control Setting Bigin---------------------------//

settings.hintAlign = "left";

// set theme
settings.theme = `
.sk_theme {
    font-family: Input Sans Condensed, Charcoal, sans-serif;
    font-size: 10pt;
    background: #24272e;
    color: #abb2bf;
}
.sk_theme tbody {
    color: #fff;
}
.sk_theme input {
    color: #d0d0d0;
}
.sk_theme .url {
    color: #61afef;
}
.sk_theme .annotation {
    color: #56b6c2;
}
.sk_theme .omnibar_highlight {
    color: #528bff;
}
.sk_theme .omnibar_timestamp {
    color: #e5c07b;
}
.sk_theme .omnibar_visitcount {
    color: #98c379;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
    background: #303030;
}
.sk_theme #sk_omnibarSearchResult ul li.focused {
    background: #3e4452;
}
#sk_status, #sk_find {
    font-size: 20pt;
}`;

//------------------------------Control Setting End-----------------------------//

// click `Save` button to make above settings to take effect.